package com.emar.adx.yiqifa.patten.builder;

/**
 * Created by Administrator on 2016/4/13.
 */
public class Car {

    private String id ;
    private String name;
    private String whool;
    private String window;
    private String door;

    private Car(CarBuilder builder) {
        this.name = builder.name;
        this.id = builder.id;
    }

    public static class CarBuilder extends BuilderFactory<Car>{
        public Car build(){
            return new Car(this);
        }
    }
//
//    public static class CarBuilder2 implements Builder<Car>{
//        public Car build(){
//            return new Car(this);
////        }
//    }

    @Override
    public String toString() {
        return "Car{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", whool='" + whool + '\'' +
                ", window='" + window + '\'' +
                ", door='" + door + '\'' +
                '}';
    }
}
